package com.jarveis.dbs.core.filter;

import org.apache.log4j.Logger;

import com.jarveis.frame.util.Param;

/**
 * @desc 过滤器代理
 * @author liuguojun
 * @date 2015-08-09
 */
public class FilterProxy {
	
	private static Logger logger = Logger.getLogger(FilterProxy.class);

	/**
	 * 代理执行
	 * 
	 * @param filter
	 * @param vo
	 * @return ParamVO
	 */
	public static int callFilter(Filter filter, Param vo) {
		int errcode = 0;
		
		try {
			errcode = filter.filter(vo);
		} catch (Exception ex) {
			logger.error(ex.getMessage(), ex);
		}

		return errcode;
	}
}
